﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>

<%@ Import Namespace="HandLab.Mvc3App.Aspx.Models.Entities" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        dl
        {
            margin-bottom: 50px;
        }
        
        dl dt
        {
            float: left;
            font-weight: bold;
            margin-right: 10px;
            padding: 5px;
            width: 100px;
        }
        
        dl dd
        {
            margin: 2px 0;
            padding: 5px 0;
            margin-top: -1;
        }
    </style>
    <script type="text/javascript" src="<%= Url.Content("~/Scripts/jquery-1.4.4.min.js") %>"></script>
    <script type="text/javascript" src="<%= Url.Content("~/Scripts/JQueryValidate.js") %>"></script>
</head>
<body>
    <%SelectList categories = ViewData["Categories"] as SelectList; %>
    <div>
        <h1>
            MVC公告发布系统--发布公告</h1>
        <%Html.BeginForm("DoRelease", "Announce", FormMethod.Post); %>
        <dl>
            <dt>标题</dt>
            <dd>
                <%=Html.TextBox("Title") %></dd>
            <dd>
                <span id="TitleValidator"></span>
            </dd>
            <dt>分类</dt>
            <dd>
                <%=Html.DropDownList("Category",categories) %></dd>
            <dt>内容</dt>
            <dd>
                <%=Html.TextArea("Content") %></dd>
            <dd>
                <span id="ContentValidator"></span>
            </dd>
        </dl>
        <input type="submit" id="Submit" value="发布" />
        <%Html.EndForm(); %>
    </div>
</body>
</html>
